package com.hmall.controller;

import com.hdmall.business.common.common.ServerResponse;
import com.hmall.service.WeChatService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName WeChatController
 * @Description
 * @Author zhoutao
 * @Date 2018/11/26 14:05
 * @Version 2.0
 **/
@Api("微信小程序接口")
@RestController
@RequestMapping("/weChat/")
public class WeChatController {

    @Autowired
    WeChatService weChatService;

    @ApiOperation("得到订单列表")
    @GetMapping("getOrderList")
    public ServerResponse getOrderList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                       @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){

        return weChatService.getOrderList(pageNum, pageSize);
    }

//    @ApiOperation("获得")
//    @GetMapping("getIdCode")
//    public ServerResponse getIdCode(String core){
//
//        return null;
//    }
}
